#include "stdafx.h"
#include "Player.h"

Player::Player(AvatarController* avatarCont, SpectatorController* specCont, MusicController* musicCont)
	: m_aCtrl(avatarCont), m_sCtrl(specCont), m_musicCtrl(musicCont) {

	m_aCtrl->setPlayer(this);
	m_sCtrl->setPlayer(this);
	m_aCtrl->setActive(false);
}

Player::~Player() {
	
}

void Player::playerDeath() {
	m_aCtrl->setActive(false);
	m_sCtrl->setActive(true);
}

void Player::playerSpawn() {
	m_sCtrl->setActive(false);
	m_aCtrl->setActive(true);
}

AvatarController* Player::getAvatarController() {
	return m_aCtrl;
}

MusicController* Player::getMusicController() {
	return m_musicCtrl;
}